﻿<?php
error_reporting(E_ALL^E_NOTICE);
session_start();

header("Content-Type:text/html;charset=utf-8");


?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="../frontend/css/cars.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <!-- header-section-starts -->
        <div id="site-nav">
            <div id="sn-bg">
                <div class="sn-bg-right">
                </div>
            </div>
            <div id="sn-bd">
                <b class="sn-edge"></b>

                <div class="sn-container">
                    <p class="sn-back-home">
                        <i class="fa fa-home" style="font-size:16px;"></i>
                        <a href="../frontend/index.html">中质国检首页</a>
                    </p>
                    <p id="login-info" class="sn-login-info">
                        <?php 
                        
                        if(isset($_SESSION['user_name'])){
                            
                        
                        
                        ?>
                        <!--em>您好，<?php //echo $_SESSION['user_name']; ?>，欢迎来到中质国检</em-->
                        <em>欢迎您，<?php echo $_SESSION['user_name']; ?></em>
                        <?php 
                        /*
                        if($_SESSION['user_status'] & 1==1){
                            echo '（未验证）';
                        }
                        */ 
                        
                        
                        ?>
                        
                        
                        
                        <a class="sn-register" href="#" onclick="logout();
                                return false;" target="_top">
                            退出登录
                        </a>
                        
                        <?php 
                        
                       
                            
                        }else{
                        
                        ?>
                        <em>您好，欢迎来到中质国检</em>
                        <a class="sn-login" href="#" onclick="window.location = '../backend/login.html';
                                return false;" target="_top">
                            请登录
                        </a>
                        
                        <?php 
                        
                        }
                        ?>
                        
                        <a class="sn-register" href="#" onclick="window.location = '../backend/regist.html';
                                return false;" target="_top">
                            免费注册
                        </a>
                    </p>
                    <ul class="sn-quick-menu">
                        <li class="sn-mytaobao menu-item j_MyTaobao">
                            <div class="sn-menu">
                                <?php 
                                //echo 'aaa' . $_SESSION['user_type'];
                                if($_SESSION['user_type'] == 'User'){
                                ?>
                                <a class="menu-hd" href="../backend/" target="_top" rel="nofollow" tabindex="0">
                                    会员中心<b></b>
                                </a>
                                <?php 
                                }else{
                                    if($_SESSION['user_type'] == 'Company'){
                                    ?>
                                    <a class="menu-hd" href="../backend/" target="_top" rel="nofollow" tabindex="0">
                                        企业中心<b></b>
                                    </a>
                                    <?php
                                    }else if($_SESSION['user_type'] == 'Manager') {
                                    ?>
                                    <a class="menu-hd" href="../backend/" target="_top" rel="nofollow" tabindex="0">
                                        管理员中心<b></b>
                                    </a>
                                    <?php
                                    }
                                    ?>
                                <!--div class="menu-bd" role="menu" aria-hidden="true" id="menu-398">
                                <div class="menu-bd-panel" id="myTaobaoPanel">
                                    <a href="//trade.taobao.com/trade/itemlist/list_bought_items.htm?t=20110530" target="_top" rel="nofollow">我的个人中心</a>
                                    <a href="//trade.taobao.com/trade/itemlist/list_sold_items.htm?t=20110530" target="_top" rel="nofollow">企业中心</a>
                                </div>
                            </div-->
                            </div>
                        </li>
                        <li class="sn-mytaobao menu-item j_MyTaobao">
                            <div class="sn-menu">
                                <a class="menu-hd" href="<?php if (isset($_SESSION['user_id'])) echo '../backend/cqc_doc.html'; else echo '../backend/login.html';?>" target="_top" rel="nofollow" tabindex="0" aria-haspopup="menu-398" aria-label="右键弹出菜单，tab键导航，esc关闭当前菜单">
                                    会员服务<b></b>
                                </a>

                                <div class="menu-bd" role="menu" aria-hidden="true" id="menu-398">
                                    <!--div class="menu-bd-panel" id="myCarPanel"-->
                                    <div class="menu-bd-panel">
                                        <!--div class="fore1">
                                            <div class="item"-->
                                                <a href="<?php if (isset($_SESSION['user_id'])) echo '../backend/cqc_doc.html'; else echo '../backend/login.html';?>" target="_top" rel="nofollow">认证备案</a>
                                            <!--/div>
                                            <div class="item"-->
                                                <a href="<?php if (isset($_SESSION['user_id'])) echo '../backend/cqc_agent.html'; else echo '../backend/login.html';?>" target="_top" rel="nofollow">
                                                    委托认证
                                        <!--span id="num-unfinishedorder">
                                        </span>
                                                </a>
                                            </div-->

                                            <!--div class="item">
                                                <a href="/glory/backend/cqc_sendcheck.html" target="_top" rel="nofollow">零部件送检
                                                    <span id="num-consultation"></span>
                                                </a>
                                            </div>
                                            <div class="item">
                                                <a href="#" target="_top" rel="nofollow">认证咨询
                                                    <span id="num-consultation"></span>
                                                </a>
                                            </div-->
                                            <!--div class="item" style="display: block;"-->
                                                <a href="<?php if (isset($_SESSION['user_id'])) echo '../backend/training.html'; else echo '../backend/login.html';?>" target="_top" rel="nofollow">培训申请</a>
                                            <!--/div-->

                                            <!--div class="item">
                                                <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">认证查询
                                                    <span id="num-reduction">

                                                    </span></a>
                                            </div>


                                            <div class="item">
                                                <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">证书注册</a>
                                            </div>
                                            <div class="item">
                                                <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">认证委托</a>
                                            </div-->
                                        <!--/div-->
                                        <!--
                                        <div class="fore2">


                                            <div class="item" style="display: block;">
                                                <a href="#" target="_top" rel="nofollow">api申请</a>
                                            </div>
                                            <div class="item" style="display: block;">
                                                <a href="#" target="_top" rel="nofollow">数据报告申请</a>
                                            </div>
                                            <div class="item" style="display: block;">
                                                <a href="#" target="_top" rel="nofollow">数据服务申请</a>
                                            </div>
                                            <div class="item" style="display: block;">
                                                <a href="#" target="_top" rel="nofollow">广告服务申请</a>
                                            </div>
                                        </div>
                                        -->
                                    </div>
                                </div>
                            </div>
                        </li>
                                <?php
                                }
                                ?>

                        <!--li class="sn-seller-center menu-item">

                            <div class="sn-menu">
                                <a target="_top" href="//mai.taobao.com/seller_admin.htm">会员服务</a>
                                <div class="menu-bd" role="menu" aria-hidden="true" id="menu-400">
                                    <div class="menu-bd-panel">
                                        <a href="//shoucang.taobao.com/item_collect.htm" target="_top" rel="nofollow">委托认证</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">零部件送检</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">认证查询</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">认证备案</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">认证培训</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">证书注册</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">认证委托</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">培训申请</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">api申请</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">数据报告申请</a>
                                        <a href="//shoucang.taobao.com/shop_collect_list.htm" target="_top" rel="nofollow">数据服务申请</a>
                                    </div>
                                </div>
                            </div>
                        </li-->

                        <li class="sn-mybrand">
                            <a target="_top" id="J_SnMyBrand" class="sn-mybrand-link" href="../backend/search_parts.html?type=heart&code="><i class="fa fa-star" style="font-size:16px;"></i>我的收藏夹</a>
                        </li>

                        <li class="sn-favorite menu-item">
                            <div class="sn-menu">
                                <a class="menu-hd" href="../backend/search_parts.html?type=favor_brand&code=" target="_top" rel="nofollow" tabindex="0" aria-haspopup="menu-400" aria-label="右键弹出菜单，tab键导航，esc关闭当前菜单"><i class="fa fa-heart"  style="font-size:16px;"></i>我的关注<b></b></a>

                                <div class="menu-bd" role="menu" aria-hidden="true" id="menu-400">
                                    <div class="menu-bd-panel">
                                        <a href="../backend/search_parts.html?type=favor_brand&code=" target="_top" rel="nofollow">我关注的品牌</a>
                                        <a href="../backend/search_parts.html?type=favor_car_type&code=" target="_top" rel="nofollow">我关注的车型</a>
                                        <a href="../backend/search_parts.html?type=favor_factory&code=" target="_top" rel="nofollow">我关注的厂家</a>
                                    </div>
                                </div>
                            </div>
                        </li>
                        <li class="sn-separator"></li>
                        <li class="sn-mobile">

                            <!--a title="质检无线" target="_top" class="sn-mobile-link" href="//mobile.tmall.com/?scm=1027.1.1.1"><i class="fa fa-mobile" style="font-size:20px;"></i>手机版</a-->
                            <a title="质检无线" target="_top" class="sn-mobile-link" href=""><i class="fa fa-mobile" style="font-size:20px;"></i>手机版</a>
                            <div class="sn-qrcode" style="display: none;"><div class="sn-qrcode-content"></div><p>扫一扫，获得认证产品！</p><b></b></div></li>
                        <!--<li class="sn-home">
                            <a href="./">中质国检</a>
                        </li>-->
                        <li class="sn-seller menu-item">
                            <div class="sn-menu J_DirectPromo">
                                <a class="menu-hd" href="//shangjia.tmall.com/portal.htm?spm=3600.7326145.a2226mz.19.hvXP0t" target="_top" tabindex="0" >商家支持<b></b></a>
                                <div class="menu-bd sn-seller-lazy" role="menu" aria-hidden="true" id="menu-402">
                                </div>
                            </div>
                        </li>

                    </ul>
                </div>
            </div>
        </div>

        <script type="text/javascript">
            $(function () {
                $(".sn-menu").hover(function () {
                    //alert(1);
                    $($(this).children("div").get(0)).css("display", "block");
                    //$(".sn-menu").getElementsByTagName('div')[0].style.display = 'block';

                }, function () {
                    $($(this).children("div").get(0)).css("display", "none");
                });

                $(".sn-mobile").hover(function () {
                    //alert(1);
                    $($(this).children("div").get(0)).css("display", "block");
                    //$(".sn-menu").getElementsByTagName('div')[0].style.display = 'block';

                }, function () {
                    $($(this).children("div").get(0)).css("display", "none");
                });
            });
            
            
        </script>
    </body>
</html>
